Socket
Socket
Sign inDemoInstall

jest-environment-enzyme

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-environment-enzyme

Runtime Environment for enzyme tests in jest


Version published
Weekly downloads
348K
increased by3.89%
Maintainers
1
Weekly downloads
 
Created
Source

jest-environment-enzyme

npm version License

Installation

We suggest using yarn for installations.

yarn add jest-environment-enzyme --dev

But npm works too!

$ npm install jest-environment-enzyme --save-dev

With this library, you don't need to have your app install Enzyme, but you have to install one of Enzymes adapters.

yarn add enzyme-adapter-* --dev

Where * is your app's adapter.

Setup

Set the testEnvironment to enzyme in your package.json.

"jest": {
  "setupTestFrameworkScriptFile": "jest-enzyme",
  "testEnvironment": "enzyme",
},

Additionally, you can specify which enzyme adapter you want to use through the testEnvironmentOptions.enzymeAdapter.

Valid options are:

  • react13
  • react14
  • react15
  • react15.4
  • react16 (default)
// package.json
"jest": {
  "setupTestFrameworkScriptFile": "jest-enzyme",
  "testEnvironment": "enzyme",
  "testEnvironmentOptions": {
    "enzymeAdapter": "react16"
  }
}

Lastly, and most importantly, this library has a hard requirement on jest-enzyme.

Keywords

FAQs

Package last updated on 21 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc